﻿set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)


include_directories(
	${BOOST_INCLUDEDIR}
	${Qt5Core_INCLUDE_DIRS}
	${MY_OPENCV_INCLUDE_DIR}
)

link_directories(
	${Boost_LIBRARY_DIRS}
	${MY_OPENCV_LIBS_DIR}
	)

set(ALGO_DLM_DEMO_LIBS 
	Qt5::Core
	Qt5::Gui
	Qt5::Widgets
	Qt5::Xml
	${MY_OPENCV_LIBS}
	txr_algo_dlm
)

file(GLOB_RECURSE monotone_cubic_src  monotone_cubic/*.hpp monotone_cubic/*.cpp)
file(GLOB CURRENT_HEADERS  *.h *.hpp)
file(GLOB CURRENT_SOURCES  *.c *.cpp)
file(GLOB QT_UI_HEADERS  *.ui)
source_group("monotone_cubic" FILES ${monotone_cubic_src}) 
source_group("include" FILES ${CURRENT_HEADERS})
source_group("source" FILES ${CURRENT_SOURCES})
source_group("ui" FILES ${QT_UI_HEADERS})

#message("QT_UI_HEADERS = ${QT_UI_HEADERS}")
#set(CMAKE_AUTOUIC_SEARCH_PATHS ${CMAKE_CURRENT_SOURCE_DIR}/generated)
#qt5_wrap_ui(UI_HEADERS ${QT_UI_HEADERS})

add_executable(txr_algo_dlm_demo 
	${monotone_cubic_src} 
	${CURRENT_HEADERS}
	${CURRENT_SOURCES}
	${UI_HEADERS}
	)

target_link_libraries(txr_algo_dlm_demo PRIVATE ${ALGO_DLM_DEMO_LIBS})	

set(MY_PATH "PATH=%PATH%" 
	${Qt5_BIN_DIR}
	${MY_OPENCV_BIN_DIR} 
	${MY_CRYPTOPP_BIN_DIR})
set_property(TARGET txr_algo_dlm_demo PROPERTY VS_DEBUGGER_ENVIRONMENT ${MY_PATH})

install(TARGETS txr_algo_dlm_demo DESTINATION 
        RUNTIME DESTINATION bin
        ARCHIVE DESTINATION lib
        LIBRARY DESTINATION lib
)